﻿using System;
using System.Collections.Generic;
using System.Text;
using Pixysoft.Framework.Reflection;
using Pixysoft.Weblications.Sango.Dao;
using Pixysoft.Weblications.Sango.Constant;
using Pixysoft.Weblications.Sango.Protocol.section;
using System.Data;
using Pixysoft.Weblications.Sango.Protocol;
using Pixysoft.Weblications.Sango.Environment;
using Pixysoft.Weblications.Sango.Battle;

namespace Pixysoft.Weblications.Sango.Command.section_rvr
{
    partial class SangoSectionRvrHandler
    {
        public sectionrvr_fightexit sectionrvr_fightexit(long roomcode)
        {
            string usercode = SangoManager.Authentication();

            sectionrvr_fightexit response = ReflectionManager.CreatePojo<sectionrvr_fightexit>();
            response.Succeed = false;

            RvrSectionTeam team = RvrSectionController.Instance.TryLeaveSectionTeam(usercode);
            if (team == null)
            {
                response.Succeed = false;
                response.Message = "not target section";
                return response;
            }

            response.profiles = UsrSectionFacade.ToProfilesBySectionTeam(team);
            response.Succeed = true;
            return response;
        }


    }
    public interface sectionrvr_fightexit : ISangoResponse
    {
        List<section_profile> profiles { get;set;}
    }
}
